The present invention relates to an object recognition system which is mounted on a vehicle and recognizes an object ahead of the vehicle, and more particularly to an object recognition system which is mounted on a vehicle and recognizes the outline of an object ahead of the vehicle.
In recent years, devices which determine the distance and size of an object in front of a vehicle, and which appropriately control the vehicle in accordance with this determination, have been proposed for improving the safety of vehicle operation. A typical method for obtaining information about the object ahead includes the steps of: extracting horizontal edges and vertical edges from captured image; determining whether each of the extracted edges belongs to the object such as a vehicle ahead; and recognizing the object based on the edges determined to belong to the object.
Japanese Patent No. 2712809 describes an apparatus for detecting an obstacle. According to the apparatus, a threshold or the number of continuous points forming each of edges in both horizontal and vertical directions is set beforehand such that it has a larger value for a lower portion on the screen, based on the fact that an object at a shorter distance is displayed larger at a lower portion on the screen. The apparatus judges an area to belong to an obstacle when the number of continuous points forming each of the edges is larger than the threshold value.
Japanese Patent Application Kokai No. Hei 7-25286 describes a method for recognizing the vehicle ahead. According to the method, a certain vertical target area is set to calculate a sum of differentiated values of densities of the pixels in each column. A certain horizontal target area is also set to calculate a sum of differentiated values of densities of the pixels in each row. A Histogram for the vertical target area is created according to the sum differentiation values for columns while a histogram for the horizontal target area is created according to the sum differentiation values for rows. In the histogram for the vertical target area, the pixel columns whose sum differentiation values are greater than a predetermined value are chosen, thereby the left and right candidate ends of the vehicle ahead being determined. In the histogram for the horizontal target area, the pixel rows whose sum differentiation values are greater than a predetermined value are chosen, thereby the upper and lower candidate ends of the vehicle ahead being determined. The amount of shift between the current coordinate and the coordinate after a period of time for each candidate point is computed. A candidate end whose amount of shift computed is less than a threshold, and which has the minimum amount of shift among all the candidate ends is determined as one of the points forming the outline of the vehicle ahead.
Japanese Patent Application Kokai No. Hei 10-97699 describes a device for determining whether or not an object exists. The device recognizes left and right guidelines such as white lines in the captured image, and extracts horizontal edges from an area between the left and right guidelines. A probable area in which an obstacle may exist is estimated based on the extracted horizontal edges. Vertical edges are then extracted in the probable area. The device judges that no object exists if the number of vertical edges whose lengths exceed a predetermined value is less than two.
However, according to Japanese Patent No. 2712809, Japanese Patent Application Kokai No. Hei 7-25286 and No. Hei 8-188104, when there are, for example, natural objects, a building, a road sign, etc. having longer edges than an object to be recognized, their edges may cause errors in object recognition. According to Japanese Patent Application Kokai No. Hei 10-97699, although a processing area is restricted by the left and right guide lines, the width of an object may be erroneously recognized due to edges of an artificial object such as a road sign, an electric light pole, a guardrail, etc. provided closest to the guide lines.
Accordingly, one object of the invention is to provide a system capable of recognizing the outline of an object from horizontal edges and/or vertical edges even if undesired edges exist in the image.
According to one aspect of the invention, an object recognition system including a position sensor, an image sensor, and a controller is provided. The position sensor determines the position of an object, and the image sensor captures an image of the object. The position sensor can be implemented with radar or a pair of image sensors. The controller sets a processing area within the image captured by the image sensor based on the position of the object determined by the position sensor and a predetermined size for the object to be recognized. It is preferable that the predetermined size is set to surround the object to be recognized.
The controller extracts edges from the processing area. Extraction of edges can be carried out by detecting a variation of intensity values of pixels contained in the processing area. The controller then judges whether each of the extracted edges belongs to the object based on characteristics of the object to be recognized.
According to one aspect of the invention, the above judgment includes checking if each of the extracted edges contains a pixel located on a boundary of the processing area. If so, the controller judges that the edge belongs to an object other than the object to be recognized.
According to another aspect of the invention, the above judgment includes examining a linearity of each of the extracted edges. If the edge has a poor linearity, then the controller judges that the edge belongs an object other than the object to be recognized. The linearity of each of the extracted edges can be examined by calculating a variance of the positions in vertical direction of the points forming the edge. If the calculated variance is greater than a predetermined value, then the controller judges that the edge belongs an object other than the object to be recognized.
According to further aspect of the invention, the above judgment includes examining a slope of each of the extracted edges. If the slope is larger than a predetermined value, then the controller judges that the edge belongs to an object other than the object. The slope of each of the extracted edges can be examined by approximating the edge by straight lines and calculating the slope of the edge approximated by straight lines.
The edges typically include horizontal and vertical edges. Alternatively, the edges may include horizontal edges only. For the latter case, the object is recognized based on the horizontal edges judged to belong to the object.
The outline of the object can be recognized by determining upper, lower, left, and right ends of the object. Thus, the vehicle ahead traveling in front of the vehicle mounting the system of the invention can be recognized by the positions of the upper, lower, left, and right ends of the outline of the vehicle ahead.
According to one aspect of the invention, the controller determines the upper and lower ends from the horizontal edges, and determines the left and right ends from the vertical edges. More particularly, for the upper end, the controller identifies an upper horizontal edge whose length is larger than a predetermined value and which is closest to the upper boundary of the processing area. For the lower end, the controller also identifies a lower horizontal edge whose length is larger than the predetermined value and which is closest to the lower boundary of the processing area. The upper end of the object is determined by the position in the vertical direction that corresponds to the identified upper horizontal edge, and the lower end of the object is determined by the position in the vertical direction that corresponds to the identified lower horizontal edge. Furthermore, the controller identifies a left vertical edge whose length is larger than a predetermined value and which is located near the left boundary of the processing area. The controller also identifies a right vertical edge whose length is larger than the predetermined value and which is located near the right boundary of the processing area. The left end of the object is determined by the position in the horizontal direction that corresponds to the identified left vertical edge, and the right end of the object is determined by the position in the horizontal direction that corresponds to the identified right vertical edge.
According to another aspect of the invention, the controller reduces the processing area in the vertical direction to the area defined by the determined upper and lower ends. In this case, the vertical edges are extracted from the reduced process area.
The controller can comprise a micro-controller which typically includes a central unit (CPU), or a micro-processor, a read-only memory (ROM) containing control programs that when executed by the processor performs respective functions which are to be described hereafter. The controller also includes a random-access memory (RAM) that provides a working area for the CPU and temporary storage for various data and programs.